import config from "@/config"
import http from "@/utils/request"

export default {
	ver: {
		url: `${config.API_URL}/demo/ver`,
		name: "获取最新版本号",
		get: async function(params){
			return await http.get(this.url, params);
		}
	},
	post: {
		url: `${config.API_URL}/system/post_role`,
		name: "分页列表",
		post: async function(data){
			return await http.post(this.url, data, {
				headers: {
					//'response-status': 401
				}
			});
		}
	},
	permission: {
		url: `${config.API_URL}/auth/role_permission`,
		name: "设置权限",
		post: async function(data){
			return await http.post(this.url, data, {
				headers: {
					//'response-status': 401
				}
			});
		}
	},
	postmenu: {
		url: `${config.API_URL}/system/post_menu`,
		name: "分页列表",
		post: async function(data){
			return await http.post(this.url, data, {
				headers: {
					//'response-status': 401
				}
			});
		}
	},
	admin_post: {
		url: `${config.API_URL}/auth/admin_save`,
		name: "添加管理员",
		post: async function(data){
			return await http.post(this.url, data, {
				headers: {
					//'response-status': 401
				}
			});
		}
	},
	admin_del: {
		url: `${config.API_URL}/auth/admin_del`,
		name: "删除管理员",
		post: async function(data){
			return await http.post(this.url, data, {
				headers: {
					//'response-status': 401
				}
			});
		}
	},
	resetpassword: {
		url: `${config.API_URL}/auth/changePwd`,
		name: "修改密码",
		post: async function(data){
			return await http.post(this.url, data, {
				headers: {
					//'response-status': 401
				}
			});
		}
	},
	order: {
		url: `${config.API_URL}/order/order_save`,
		name: "订单操作",
		post: async function(data){
			return await http.post(this.url, data, {
				headers: {
				     
				}
			});
		}
	},
	paystyle:{
		url: `${config.API_URL}/order/paystyle`,
		name: "获取支付方式",
		get: async function(params){
			return await http.get(this.url, params);
		}
	},
	express: {
		url: `${config.API_URL}/order/express`,
		name: "获取快递公司",
		get: async function(params){
			return await http.get(this.url, params);
		}
	},
	express_post: {
		url: `${config.API_URL}/order/express_save`,
		name: "保存快递公司",
		post: async function(data){
			return await http.post(this.url, data, {
				headers: {
				     
				}
			});
		}
	},
	express_del: {
		url: `${config.API_URL}/order/express_del`,
		name: "删除快递公司",
		post: async function(data){
			return await http.post(this.url, data, {
				headers: {
				     
				}
			});
		}
	},
	agreement_post:{
		url: `${config.API_URL}/system/agreement_save`,
		name: "保存商品",
		post: async function(data){
			return await http.post(this.url, data, {
				headers: {
				     
				}
			});
		}
	},
	withdraw_post:{
		url: `${config.API_URL}/finance/withdraw_save`,
		name: "保存商品",
		post: async function(data){
			return await http.post(this.url, data, {
				headers: {
				     
				}
			});
		}
	},
	area:{
		url: `${config.API_URL}/system/area`,
		name: "获取地区",
		post: async function(data){
			return await http.post(this.url, data, {
				headers: {
				     
				}
			});
		}
	},
	order_export:{
		url: `${config.API_URL}/order/export`,
		name: "订单导出",
		post: async function(data){
			return await http.post(this.url, data, {
				headers: {
				     
				}
			});
		}
	},
	goods_del: {
		url: `${config.API_URL}/goods/goods_del`,
		name: "删除商品",
		post: async function(data){
			return await http.post(this.url, data, {
				headers: {
					//'response-status': 401
				}
			});
		}
	},
	goodsspec_del:{
		url: `${config.API_URL}/goods/goodsspec_del`,
		name: "删除商品规格",
		post: async function(data){
			return await http.post(this.url, data, {
				headers: {
					//'response-status': 401
				}
			});
		}
	},
	user_del: {
		url: `${config.API_URL}/user/user_del`,
		name: "删除会员",
		post: async function(data){
			return await http.post(this.url, data, {
				headers: {
					//'response-status': 401
				}
			});
		}
	},
	user_post: {
		url: `${config.API_URL}/user/user_save`,
		name: "保存会员",
		post: async function(data){
			return await http.post(this.url, data, {
				headers: {
				     
				}
			});
		}
	},
	goodscat_post: {
		url: `${config.API_URL}/goods/cat_save`,
		name: "保存商品分类",
		post: async function(data){
			return await http.post(this.url, data, {
				headers: {
				     
				}
			});
		}
	},
	setting_pay: {
		url: `${config.API_URL}/system/save_pay`,
		name: "支付设置",
		post: async function(data){
			return await http.post(this.url, data, {
				headers: {
					//'response-status': 401
				}
			});
		}
	},
	page: {
		url: `${config.API_URL}/demo/page`,
		name: "分页列表",
		get: async function(params){
			return await http.get(this.url, params);
		}
	},
	list: {
		url: `${config.API_URL}/demo/list`,
		name: "数据列表",
		get: async function(params){
			return await http.get(this.url, params);
		}
	},
	menu: {
		url: `${config.API_URL}/demo/menu`,
		name: "普通用户菜单",
		get: async function(){
			return await http.get(this.url);
		}
	},
	status: {
		url: `${config.API_URL}/demo/status`,
		name: "模拟无权限",
		get: async function(code){
			return await http.get(this.url, {}, {
				headers: {
					"response-status": code
				}
			});
		}
	}
}
